#! /usr/bin/perl -w
# $Id: fgtest.pl,v 1.4 2004/02/29 19:15:46 ibo Exp $

use lib "/home/ibo/user/devel/foge2/foge-20040117/";

use strict;
use CGI::FOGE2::Form;

# CGI::FOGE2::Tools::set_language('fr');

## the form
my $form = CGI::FOGE2::Form->new
    (
     title          => "Fitness",
     enquiry        => "fitness_form",
     dbName         => "dbi:Pg:dbname=fitness host=localhost",
     dbReaderLogin  => "fitness_r",
     dbWriterLogin  => "fitness_w",
     dbReaderPass   => "test_foge_pwr",
     dbWriterPass   => "test_foge_pww",
     css            => "../foge.css",
     scriptversion  =>
     '$Id: fgtest.pl,v 1.4 2004/02/29 19:15:46 ibo Exp $', # '
     );

## section and then its questions
my $sec01 = CGI::FOGE2::Section->new
    (
     title => 'Exercises',
     table => 'fitness_form_sec01',
     prolog => 'What about your strength'
     );

$sec01->addquestion(
CGI::FOGE2::Menu->new(
     id => 'muscle',
     title => 'Which muscle did you exercise?',
     items => ['Biceps', 'Triceps', 'Pecto', 'Back', 'Shoulder'],
     ismandatory => 1,
     stats => [CGI::FOGE2::StatsSimple->new([0, 3])],
    ),
CGI::FOGE2::Menu->new(
     id => 'count',
     title => 'How many times did you repeat that exercise',
     items => ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15'],
     ismandatory => 1,
     stats => [CGI::FOGE2::StatsSimple->new(),],
    ),
CGI::FOGE2::Menu->new(
     id => 'kgs',
     title => 'What weight?',
     items => ['8', '10', '12', '14', '16', '18', '20'],
     ismandatory => 1,
     stats => [CGI::FOGE2::StatsSimple->new(),],
    ),
CGI::FOGE2::RadioButton->new(
     id => 'difficult',
     title => 'Was it difficult?',
     ismandatory => 0,
     ismultiple => 1,
     items => ['no', 'not very much', 'almost', 'yes', 'very difficult', 'I AM ARNOLD']
    )
		     
		    
);


$form->addsection($sec01);
$form->main();
